home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / src-server / xlisp / Makefile.hpux < prev    next >
Encoding:
Makefile  |  1991-10-06  |  8.2 KB  |  258 lines

  1. ################################################################################
  2. #
  3. # File:         Makefile.hpux
  4. # RCS:          $Header: Makefile.hpux,v 1.3 91/03/25 03:55:33 mayer Exp $
  5. # Description:  Makefile for WINTERP's libXlisp.a on s300 HPUX 7.0 -- see
  6. #        notes below for modifying this file for use on s800 HPUX 7.0
  7. # Author:       Niels Mayer, HPLabs
  8. # Created:      Mon Oct 23 21:00:37 1989
  9. # Modified:     Sat Oct  5 22:33:59 1991 (Niels Mayer) mayer@hplnpm
  10. # Language:     N/A
  11. # Package:      N/A
  12. # Status:       X11r5 contrib tape release
  13. #
  14. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. #
  17. # Permission to use, copy, modify, distribute, and sell this software and its
  18. # documentation for any purpose is hereby granted without fee, provided that
  19. # the above copyright notice appear in all copies and that both that
  20. # copyright notice and this permission notice appear in supporting
  21. # documentation, and that the name of Hewlett-Packard and David Betz not be
  22. # used in advertising or publicity pertaining to distribution of the software
  23. # without specific, written prior permission.  Hewlett-Packard and David Betz
  24. # make no representations about the suitability of this software for any
  25. # purpose. It is provided "as is" without express or implied warranty.
  26. #
  27. # HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  28. # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  29. # IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
  30. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  31. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  32. # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  33. # PERFORMANCE OF THIS SOFTWARE.
  34. #
  35. # See ./winterp/COPYRIGHT for information on contacting the authors.
  36. #
  37. # Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  38. # Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
  39. #
  40. ################################################################################
  41.  
  42. #
  43. # Note on INCLUDES for Motif 1.0:
  44. # ==============================
  45. # Motif 1.0 does not use the standard X11r4 toolkit, therefore you must
  46. # make sure that you are compiling Motif 1.0 programs with the headers
  47. # associated with Motif 1.0, not the X11r4 headers.
  48. #
  49. # Standard locations for Motif includes are /usr/include/X11 and
  50. # /usr/include/Xm. Note that Motif 1.0 uses a variant of the X11r3 toolkit
  51. # intrinsics headers which are installed in /usr/include/X11. Don't
  52. # confuse these    with the incompatible Xtoolkit intrinsics from X11r4.
  53. #
  54. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xt/Xm
  55. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  56. # (normally -I/usr/include -I.), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  57. # TO THE APPROPRIATE LOCATION.
  58. #
  59. #
  60. # Note on INCLUDES for Motif 1.1:
  61. # ==============================
  62. # Motif 1.1 uses the X11r4 Xlib, libXt, etc, however, Motif 1.1 is not
  63. # included as part of the X11r4 distribution.  Make sure that you either
  64. # have the X11r4 and Motif headers installed, or that you are setting
  65. # INCLUDES so that the appropriate include directories are used.
  66. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xm
  67. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  68. # (e.g. /usr/include/Xm), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  69. # TO THE APPROPRIATE LOCATION.
  70. #            --------------------
  71. # NOTE: if you modify INCLUDES below, you must also do the same 
  72. # modification in ../Makefile.hpux
  73. #
  74.  
  75. # INCLUDES = -I. -I/mnt0/src/OSFMotif1.1.1 -I/mnt0/src/OSFMotif1.1.1/X11 -I/mnt0/src/X11r4/mit -I/mnt0/src/X11r4/mit/X11
  76. INCLUDES = -I. -I/usr/include
  77.  
  78.  
  79.  
  80. #
  81. # Note on DEFINES:
  82. # (1) -DWINTERP: xlisp/xlisp.h and xlisp/xldmem.h (which are included by all
  83. # WINTERP files) have '#ifdef WINTERP' surrounding changes made to XLISP
  84. # for use by WINTERP: you MUST compile with -DWINTERP or nothing will work.
  85. #
  86. # (2) -DSYSV and -Dhpux are used to make X11 software more portable, in
  87. # conjuction with macros in X11/Xos.h.
  88. #
  89. # (3) -DMALLOC_0_RETURNS_NULL is needed on HPUX 7.0 when linking with
  90. # the fast malloc library "-lmalloc".
  91. #
  92. # (4) -D_NO_PROTO: this is required by Motif 1.1 if you are using a
  93. # non-ANSI-C compiler. Eventually everybody will have an ANSI C compiler
  94. # and at that point this flag should be removed.
  95. #            --------------------
  96. # NOTE: if you modify DEFINES below, you must also do the same 
  97. # modification in ../Makefile.hpux
  98. #
  99.  
  100. DEFINES = -DWINTERP -DSYSV -Dhpux -DMALLOC_0_RETURNS_NULL -D_NO_PROTO $(USER_DEFINES)
  101.  
  102.  
  103. #
  104. # Note on CFLAGS:
  105. # For HPUX 8.0 or s800 HPUX 7.0, remove
  106. # "-Wc,-Nd4000,-Ns3300,-Ne700,-Np1000" from CFLAGS below.
  107. #
  108. CFLAGS = $(INCLUDES) -Wc,-Nd4000,-Ns3300,-Ne700,-Np1000 $(DEFINES)
  109.  
  110.  
  111. OPTIMIZER = -O
  112.  
  113.  
  114. ##############################################################################
  115. LINT = /usr/bin/lint
  116. .SUFFIXES: .ln .c
  117. .c.ln:
  118.     $(LINT) -c $*.c -Nd4000 -Ns3000 -Na50000 $(DEFINES)
  119.  
  120.  
  121. ##############################################################################
  122. .c.o:
  123.     $(CC) -c $(OPTIMIZER) $*.c $(CFLAGS)
  124.  
  125.  
  126. ##############################################################################
  127. HDRS          = osdefs.h \
  128.         osptrs.h \
  129.         xldmem.h \
  130.         xlisp.h
  131.  
  132. SRCS          = unixstuff.c \
  133.         xlbfun.c \
  134.         xlcont.c \
  135.         xldbug.c \
  136.         xldmem.c \
  137.         xleval.c \
  138.         xlfio.c \
  139.         xlglob.c \
  140.         xlimage.c \
  141.         xlinit.c \
  142.         xlio.c \
  143.         xljump.c \
  144.         xllist.c \
  145.         xlmath.c \
  146.         xlobj.c \
  147.         xlpp.c \
  148.         xlprin.c \
  149.         xlread.c \
  150.         xlstr.c \
  151.         xlstruct.c \
  152.         xlsubr.c \
  153.         xlsym.c \
  154.         xlsys.c
  155.  
  156. OBJS          = $(SRCS:.c=.o)
  157.  
  158. LINTS          = $(SRCS:.c=.ln)
  159.  
  160. ##############################################################################
  161. DEST          = .
  162.  
  163. INSTALL          = install
  164.  
  165. LIBRARY          = libXlisp.a
  166.  
  167. LINT_LIB      = llib-Xlisp.ln
  168.  
  169. MAKEFILE      = Makefile.hpux
  170.  
  171. PRINT          = pr
  172.  
  173. SHELL          = /bin/sh
  174.  
  175. all::        $(LIBRARY)
  176.  
  177. $(LIBRARY):    $(OBJS)
  178.         @echo "Loading $(LIBRARY) ..."
  179.         ar cruv $(LIBRARY) $(OBJS)
  180.         @echo "$(LIBRARY) done"
  181.  
  182. $(LINT_LIB):    $(LINTS)
  183.         @echo "Loading $(LINT_LIB) ..."
  184.         $(LINT) -o Xlisp -x -Zn8192 -Zt16384 -Zf500 $(LINTS)
  185.         @echo "$(LINT_LIB) done"
  186.  
  187. lisp::
  188.         @echo "Making XLISP ..."
  189.         @echo "    Deleteing WINTERP *.o files for recompiling xlisp sources without -DWINTERP."
  190.         rm -f $(OBJS) xlisp.o xlftab.o
  191.         make -f Makefile.hpux "CFLAGS=-DUNIX" "OPTIMIZER=-O" xlisp
  192.         @echo "    Deleteing XLISP *.o files to ensure future WINTERP compilations uses XLISP sources compiled with -DWINTERP."
  193.         rm -f $(OBJS)
  194.         @echo "Done Making XLISP."
  195.  
  196. #
  197. # Note that if you've compiled winterp previously, you should delete the *.o
  198. # files in this directory, since those were compiled with -DWINTERP which will
  199. # require that extra X11/Motif/Winterp code be linked in with the exectable.
  200. #        
  201. xlisp:        xlisp.o xlftab.o $(OBJS)
  202.         @echo "    Loading XLISP ..."
  203.         $(CC) -O -s -o xlisp xlisp.o xlftab.o $(OBJS) -lm -lmalloc
  204.         @echo "    done"
  205.  
  206. clean:;        rm -f $(OBJS) $(LINTS) core xlisp.o xlftab.o
  207.  
  208. clobber:;    rm -f $(OBJS) $(LIBRARY) $(LINTS) $(LINT_LIB) core tags xlisp xlisp.o xlftab.o
  209.  
  210. depend:;    mkmf -f $(MAKEFILE) ROOT=$(ROOT)
  211.  
  212. echo:;        @echo $(HDRS) $(SRCS)
  213.  
  214. extract:;    ar x $(DEST)/$(LIBRARY)
  215.  
  216. index:;        ctags -wx $(HDRS) $(SRCS)
  217.  
  218. install:    $(LIBRARY)
  219.         @echo Installing $(LIBRARY) in $(DEST)
  220.         if [ $(DEST) != . ]; then \
  221.         (rm -f $(DEST)/$(LIBRARY); $(INSTALL) -f $(DEST) $(LIBRARY)); fi
  222.  
  223. print:;        $(PRINT) $(HDRS) $(SRCS)
  224.  
  225. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  226.  
  227. update:         $(DEST)/$(LIBRARY)
  228.  
  229. $(DEST)/$(LIBRARY): $(SRCS) $(HDRS)
  230.         $(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install
  231. ###
  232. unixstuff.o:    xlisp.h xldmem.h
  233. xlbfun.o:    xlisp.h xldmem.h
  234. xlcont.o:    xlisp.h xldmem.h
  235. xldbug.o:    xlisp.h xldmem.h
  236. xldmem.o:    xlisp.h xldmem.h
  237. xleval.o:    xlisp.h xldmem.h
  238. xlfio.o:    xlisp.h xldmem.h
  239. xlftab.o:    xlisp.h xldmem.h
  240. xlglob.o:    xlisp.h xldmem.h
  241. xlimage.o:    xlisp.h xldmem.h
  242. xlinit.o:    xlisp.h xldmem.h
  243. xlio.o:        xlisp.h xldmem.h
  244. xlisp.o:    xlisp.h xldmem.h
  245. xljump.o:    xlisp.h xldmem.h
  246. xllist.o:    xlisp.h xldmem.h
  247. xlmath.o:    xlisp.h xldmem.h
  248. xlobj.o:    xlisp.h xldmem.h
  249. xlpp.o:        xlisp.h xldmem.h
  250. xlprin.o:    xlisp.h xldmem.h
  251. xlread.o:    xlisp.h xldmem.h
  252. xlstr.o:    xlisp.h xldmem.h
  253. xlstruct.o:    xlisp.h xldmem.h
  254. xlsubr.o:    xlisp.h xldmem.h
  255. xlsym.o:    xlisp.h xldmem.h
  256. xlsys.o:    xlisp.h xldmem.h
  257.